Add some more info for desktop app info
authorMatthias Clasen <mclasen@redhat.com>
Wed, 9 Feb 2011 14:01:16 +0000 (09:01 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 9 Feb 2011 14:01:16 +0000 (09:01 -0500)
Small gotchas that can easily be avoided.

docs/reference/gtk/migrating-2to3.xml

index 2b2f4728e2165dd4cb114d95557d3cf0a42be1ad..915ed4591f529a7f6cf5c36e275fe8fb04ed1907 100644 (file)
         GAppLaunchContext *context;
         GError *error = NULL;
 
-        info = g_desktop_app_info_new ("epiphany.desktop");
+        info = (GAppInfo *) g_desktop_app_info_new ("epiphany.desktop");
         context = gdk_display_get_app_launch_context (display);
         g_app_info_launch (info, NULL, context, &amp;error);
 
         g_object_unref (info);
         g_object_unref (context);
         </programlisting></informalexample>
+        Remember that you have to include
+        <filename>gio/gdesktopappinfo.h</filename>
+        and use the <filename>gio-unix-2.0</filename> pkg-config file
+        when using g_desktop_app_info_new().
         </listitem>
         <listitem>If you are launching a custom commandline, you can
         still use g_app_info_launch() with a GAppInfo that is constructed